package com.zw.design.pattern.creational.prototype;

import lombok.Data;

@Data
public class Mail  implements Cloneable {

    private String name;
    private String emailAddress;
    private String content;

    //重写克隆方法
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }


    @Override
    public String toString() {
        return "Mail{" +
                "name='" + name + '\'' +
                ", emailAddress='" + emailAddress + '\'' +
                ", content='" + content + '\'' +
                '}'+super.toString();
    }
}
